﻿using SD.Infrastructure.EntityBase;

namespace SlamDunk.MES.Domain.Entities.AcquisitionContext
{
    /// <summary>
    /// 采集规则项
    /// </summary>
    public class AcquisitionRuleItem : PlainEntity, ISortable
    {
        #region # 构造器

        #region 00.无参构造器
        /// <summary>
        /// 无参构造器
        /// </summary>
        protected AcquisitionRuleItem() { }
        #endregion

        #region 01.创建采集规则项构造器
        /// <summary>
        /// 创建采集规则项构造器
        /// </summary>
        /// <param name="variableNo">变量编号</param>
        /// <param name="variableName">变量名称</param>
        /// <param name="equipmentNo">设备编号</param>
        /// <param name="sort">排序</param>
        /// <param name="description">描述</param>
        public AcquisitionRuleItem(string variableNo, string variableName, string equipmentNo, int sort, string description)
            : this()
        {
            this.VariableNo = variableNo;
            this.VariableName = variableName;
            this.EquipmentNo = equipmentNo;
            this.Sort = sort;
            this.Description = description;
        }
        #endregion

        #endregion

        #region # 属性

        #region 变量编号 —— string VariableNo
        /// <summary>
        /// 变量编号
        /// </summary>
        public string VariableNo { get; private set; }
        #endregion

        #region 变量名称 —— string VariableName
        /// <summary>
        /// 变量名称
        /// </summary>
        public string VariableName { get; private set; }
        #endregion

        #region 设备编号 —— string EquipmentNo
        /// <summary>
        /// 设备编号
        /// </summary>
        public string EquipmentNo { get; private set; }
        #endregion

        #region 排序 —— int Sort
        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; private set; }
        #endregion

        #region 描述 —— string Description
        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; private set; }
        #endregion

        #region 导航属性 - 采集规则 —— AcquisitionRule AcquisitionRule
        /// <summary>
        /// 导航属性 - 采集规则
        /// </summary>
        public virtual AcquisitionRule AcquisitionRule { get; internal set; }
        #endregion

        #endregion
    }
}
